package com.hserver.beetlsql.dao;

import cn.hserver.plugin.beetlsql.annotation.BeetlSQL;
import com.hserver.beetlsql.bean.User;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.Sql;
import org.beetl.sql.mapper.annotation.Update;

import java.util.List;

/**
 * 默认类型的数据源，配置的主从
 */
@BeetlSQL
public interface UserDao extends BaseMapper<User> {

    @Update
    @Sql("update user set age = ? where id = ?")
    void update(Integer age, int id);

    List<User> select();

    List<User> selectTest(@Param("name") String name,@Param("start") Integer start, @Param("end") Integer end);
}
